
module common_mux_n_to_1 #(
    parameter WIDTH = 8,  // Width of each input
    parameter N     = 4   // Number of inputs
) (
    input  logic [        N-1:0][WIDTH-1:0] data_in,  // N inputs of WIDTH bits
    input  logic [$clog2(N)-1:0]            sel,      // Selector
    output logic [    WIDTH-1:0]            data_out  // Output
);

    always_comb begin
        data_out = data_in[sel];
    end

endmodule
